<template>
<!-- 此页无用！！！！！ -->
  <div class="home">
    <!-- <div class="head">
      <ul>
        <li
          v-for="(item,index) in list"
          :key="index"
          @click="click(item,index)"
          :class="[index == stak  ? 'active' : '']"
        >{{item.name}}</li>
      </ul>
    </div> -->
    <keep-alive>
      <router-view v-if="isRouterAlive"></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
  name: "on_line",

  data() {
    return {
      isRouterAlive: true,
      list: [
        {
          name: "线下技术交流讲座",
          url: "/lecture",
        },


        {
          name: "线下展位直播",
          url: "/Administration",
        },
        {
          name: "线上洽谈",
          url: "/Negotiation",
        },
        {
          name: "线上直播",
          url: "/online",
        },
      ],
      stak: 0,
    };
  },
  methods: {
    click(item,index){
      // alert(index)
      this.$router.push(item.url)
      this.stak=index
      sessionStorage.setItem('id',index)
      this.stak = parseFloat(sessionStorage.getItem('id'))
    }
  },
  mounted() {
    this.stak=sessionStorage.getItem("id")

  },
  created() {

  },
}
</script>

<style lang="less" scoped>
.home {
  .head {
    width: 15.8rem;
    height: 0.5rem;
    background: rgba(255, 255, 255, 1);
    border-radius: 0.08rem;
    margin: 0 auto;
    margin-top: 0.3rem;
    margin-left: 0.3rem;
    margin-bottom: 0.3rem;
    ul {
      width: 15.8rem;
      height: 0.5rem;
      display: flex;
      li {
        margin-left: 0.8rem;
        font-size: 0.18rem;
        font-family: Microsoft YaHei;
        font-weight: bold;
        color: #333333;
        line-height: 0.5rem;
        cursor: pointer;
      }
      .active {
        margin-left: 0.8rem;
        font-size: 0.18rem;
        font-family: Microsoft YaHei;
        font-weight: bold;
        color: rgba(0, 76, 179, 1);
        line-height: 0.5rem;
        cursor: pointer;
        border-bottom: 0.02rem rgba(0, 76, 179, 1) solid;
      }
    }
  }
}
</style>
